using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ImageAnalystTools._DeepLearning
{
    /// <summary>
    /// <para>Detect Change Using Deep Learning</para>
    /// <para>Runs a trained deep learning model to detect change between two rasters.</para>
    /// <para>运行经过训练的深度学习模型以检测两个栅格之间的变化。</para>
    /// </summary>    
    [DisplayName("Detect Change Using Deep Learning")]
    public class DetectChangeUsingDeepLearning : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DetectChangeUsingDeepLearning()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_from_raster">
        /// <para>From Raster</para>
        /// <para>The input images of the previous raster.</para>
        /// <para>上一个栅格的输入影像。</para>
        /// </param>
        /// <param name="_to_raster">
        /// <para>To Raster</para>
        /// <para>The input images of the recent raster.</para>
        /// <para>最近栅格的输入影像。</para>
        /// </param>
        /// <param name="_out_classified_raster">
        /// <para>Output Classified Raster</para>
        /// <para>The output classified raster that shows the change.</para>
        /// <para>显示更改的输出分类栅格。</para>
        /// </param>
        /// <param name="_in_model_definition">
        /// <para>Model Definition</para>
        /// <para><xdoc>
        ///   <para>The Esri model definition parameter value can be an Esri model definition JSON file (.emd), a JSON string, or a deep learning model package (.dlpk). A JSON string is useful when this tool is used on the server so you can paste the JSON string rather than upload the .emd file. The .dlpk file must be stored locally.</para>
        ///   <para>It contains the path to the deep learning binary model file, the path to the Python raster function to be used, and other parameters such as preferred tile size or padding.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>Esri 模型定义参数值可以是 Esri 模型定义 JSON 文件 （.emd）、JSON 字符串或深度学习模型包 （.dlpk）。在服务器上使用此工具时，JSON 字符串非常有用，因此您可以粘贴 JSON 字符串，而不是上传 .emd 文件。.dlpk 文件必须存储在本地。</para>
        ///   <para>它包含深度学习二进制模型文件的路径、要使用的 Python 栅格函数的路径以及其他参数，例如首选切片大小或填充。</para>
        /// </xdoc></para>
        /// </param>
        public DetectChangeUsingDeepLearning(object _from_raster, object _to_raster, object _out_classified_raster, object _in_model_definition)
        {
            this._from_raster = _from_raster;
            this._to_raster = _to_raster;
            this._out_classified_raster = _out_classified_raster;
            this._in_model_definition = _in_model_definition;
        }
        public override string ToolboxName => "Image Analyst Tools";

        public override string ToolName => "Detect Change Using Deep Learning";

        public override string CallName => "ia.DetectChangeUsingDeepLearning";

        public override List<string> AcceptEnvironments => ["cellSize", "extent", "geographicTransformations", "gpuID", "outputCoordinateSystem", "parallelProcessingFactor", "processorType", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_from_raster, _to_raster, _out_classified_raster, _in_model_definition, _arguments];

        /// <summary>
        /// <para>From Raster</para>
        /// <para>The input images of the previous raster.</para>
        /// <para>上一个栅格的输入影像。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_raster { get; set; }


        /// <summary>
        /// <para>To Raster</para>
        /// <para>The input images of the recent raster.</para>
        /// <para>最近栅格的输入影像。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_raster { get; set; }


        /// <summary>
        /// <para>Output Classified Raster</para>
        /// <para>The output classified raster that shows the change.</para>
        /// <para>显示更改的输出分类栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Classified Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_classified_raster { get; set; }


        /// <summary>
        /// <para>Model Definition</para>
        /// <para><xdoc>
        ///   <para>The Esri model definition parameter value can be an Esri model definition JSON file (.emd), a JSON string, or a deep learning model package (.dlpk). A JSON string is useful when this tool is used on the server so you can paste the JSON string rather than upload the .emd file. The .dlpk file must be stored locally.</para>
        ///   <para>It contains the path to the deep learning binary model file, the path to the Python raster function to be used, and other parameters such as preferred tile size or padding.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>Esri 模型定义参数值可以是 Esri 模型定义 JSON 文件 （.emd）、JSON 字符串或深度学习模型包 （.dlpk）。在服务器上使用此工具时，JSON 字符串非常有用，因此您可以粘贴 JSON 字符串，而不是上传 .emd 文件。.dlpk 文件必须存储在本地。</para>
        ///   <para>它包含深度学习二进制模型文件的路径、要使用的 Python 栅格函数的路径以及其他参数，例如首选切片大小或填充。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Model Definition")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_model_definition { get; set; }


        /// <summary>
        /// <para>Arguments</para>
        /// <para>The function arguments are defined in the Python raster function class. This is where you list additional deep learning parameters and arguments for experiments and refinement, such as a confidence threshold for adjusting sensitivity. The names of the arguments are populated from reading the Python module.</para>
        /// <para>函数参数在 Python 栅格函数类中定义。在这里，您可以列出用于实验和优化的其他深度学习参数和参数，例如用于调整灵敏度的置信度阈值。参数的名称是通过读取 Python 模块来填充的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Arguments")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _arguments { get; set; } = null;


        public DetectChangeUsingDeepLearning SetEnv(object cellSize = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}